package com.zw.a.basic.a06.demo02_extends;

//测试类
public class PersonTest {
    public static void main(String[] args) {
        //1. 测试老师类
        Teacher t = new Teacher();
        //属性
        //从Person类继承.
        t.setName("刘亦菲");
        t.setAge(33);
        System.out.println(t.getName() + "..." + t.getAge());
        //方法
        t.eat();        //从Person类继承.
        t.sleep();      //从Person类继承.
        t.teach();      //本类的独有功能.
        //2. 测试学生类, 留给你自己写.
    }
}
